package com.song.pattern.factorymethod.factory;

import com.song.pattern.factorymethod.sender.MailSender;
import com.song.pattern.factorymethod.sender.SMSSender;
import com.song.pattern.factorymethod.sender.Sender;

public class SimpleSendFactory {
	
	public  Sender produce(String type){
		if("mail".equals(type)){
			return new MailSender();
		}
		if("sms".equals(type)){
			return new SMSSender();
		}
		return null;
	}
}
